package com.donger.common.security.service;

import org.springframework.security.oauth2.common.exceptions.InvalidClientException;
import org.springframework.security.oauth2.provider.ClientDetails;
import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;

import javax.sql.DataSource;


public class BootClientDetailsService extends JdbcClientDetailsService {

    public BootClientDetailsService(DataSource dataSource) {
        super(dataSource);
    }

    /**
     * TODO 可以增加缓存 重写方法 支持缓存
     *
     * @param clientId
     * @return
     * @throws InvalidClientException
     */
    @Override
    public ClientDetails loadClientByClientId(String clientId) {
        return super.loadClientByClientId(clientId);
    }
}
